{extends file="insider_base.html"} 
{block name=function}
{function name="default_src"}{strip}
{$root}{$item.thumb|default:$item.image|default:setting('default_image')}
{/strip}{/function}

{function name="show_case_1" list=[] mdl=$mdl}
<ul class="list cms_case1">
    {foreach $list as $item}
    <li><span>[{$item.date|date_format:'Y-m-d'}]</span><a href="{call view_link item=$item}">{$item.title}</a></li>
    {/foreach}
</ul>
{/function}

{function name="show_case_2" list=[] mdl=$mdl}
<ul class="list cms_case2 clearfix">
    {foreach $list as $item}
    <li class="{cycle values='odd,even'}">
        <div class="thumb">
            <a href="{call view_link item=$item}" style="background-image: url('{call default_src}');" class="coverBg cms_tran"><img  src="{call default_src}" alt="{$item.title}" class="hidden"/></a>
        </div>
        <h4><a href="{call view_link item=$item}">{$item.title}</a></h4>
        <p>{call trim_content html=$item.summary|default:$item.content length=100}</p>
    </li>
    {/foreach}
</ul>
{/function}

{function name="show_case_3" list=[] mdl=$mdl}
<ul class="grid cms_case3 clearfix">
    {foreach $list as $item}
    <li>
        <div class="thumb">
            <a href="{call view_link item=$item}" style="background-image: url('{call default_src}');" class="coverBg cms_tran">
                <img  src="{call default_src}" alt="{$item.title}" class="hidden"/>
                <div class="bgcolor cms_tran_in"></div>
                <div class="mask cms_tran">
                    <i class="line_l cms_tran"></i>
                    <i class="line_t cms_tran"></i>
                    <i class="line_r cms_tran"></i>
                    <i class="line_b cms_tran"></i>
                </div>
                <h4 class="cms_tran {cycle values='odd,even'}">{$item.title}</h4>
            </a>            
        </div>
    </li>
    {/foreach}
</ul>
{/function}

{function name="show_case_4" list=[] mdl=$mdl}
<ul class="grid cms_case4 clearfix">
    {foreach $list as $item}
    <li class="ite_{$item@iteration%4} {cycle values='odd,even'}">
        {if $item@iteration%2==1}<h4 class="cms_tran">{$item.title}</h4>{/if}
        <div class="thumb">
            <a href="{call view_link item=$item}" style="background-image: url('{call default_src}');" class="coverBg cms_tran"><img  src="{call default_src}" alt="{$item.title}" class="hidden"/></a>
        </div>
        {if $item@iteration%2==0}<h4 class="cms_tran">{$item.title}</h4>{/if}
        <a class="mask cms_tran" href="{call view_link item=$item}"></a>
    </li>
    {/foreach}
</ul>
{/function}

{/block}


{block name=insider}
<div id="insider_show">
    {$list_style=$menu_data.list_style|default:'show_case_1'}
    {call $list_style list=$list}
</div>

<div id="cms_page" class="clearfix">
    <div class="cms_page_relative clearfix">{$render}</div>
</div>
{/block}